<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>表单向导</title>
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <link rel="stylesheet" href="../../plugin/bootstrap/css/bootstrap.min.css">
  <link rel="stylesheet" href="../../plugin/font-awesome/css/font-awesome.min.css">
  <link rel="stylesheet" href="../../plugin/Ionicons/css/ionicons.min.css">
  <link rel="stylesheet" href="../../adminlte/css/AdminLTE.min.css">
  <link rel="stylesheet" href="../../adminlte/css/skins/all-skins.min.css">
  <link rel="stylesheet" href="../../plugin/validate/validate.css">
  <link rel="stylesheet" href="../../plugin/steps/jquery.steps.css">
  <link rel="stylesheet" href="../../system/css/common.css">

  <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->
</head>
<body class="hold-transition gray-bg sidebar-mini">
    <div class="wrapper">
        <section class="content">
			<div class="row">
			    <div class="col-sm-12">
			        <div class="box box-primary">
			            <div class="box-header">
			              <h3 class="box-title"> 带验证向导</h3>
			            </div>
			            <div class="box-body">
			                <form id="form" action="" class="wizard-big form-horizontal">
			                    <h1>账户</h1>
			                    <fieldset>
			                        <div class="form-group">
			                            <label class="col-sm-3 control-label">用户名 <span
			                                style="color: red">*</span>:
			                            </label>
			                            <div class="col-sm-8">
			                                <input name="username" class="form-control" min="3" require="必填项" placeholder="">
			                            </div>
			                        </div>
			                        <div class="form-group">
			                            <label class="col-sm-3 control-label">密码 <span
			                                style="color: red">*</span>:
			                            </label>
			                            <div class="col-sm-8">
			                                <input name="password" type="password" class="form-control" min="3" require="必填项" placeholder="">
			                            </div>
			                        </div>
			                        <div class="form-group">
			                            <label class="col-sm-3 control-label">确认密码 *</label>
			                            <div class="col-sm-8">
			                                <input id="confirm" name="confirm" type="text" class="form-control" require="必填项">
			                            </div>
			                        </div>
			                    </fieldset>
			                    <h1>个人资料</h1>
			                    <fieldset>
			                        <div class="row">
			                            <div class="col-sm-6">
			                                <div class="form-group">
			                                    <label class="col-sm-3 control-label">姓名 *</label>
			                                    <div class="col-sm-8">
			                                        <input id="name" name="name" type="text" class="form-control" require="必填项">
			                                    </div>
			                                </div>
			                            </div>
			                            <div class="col-sm-6">
			                                <div class="form-group">
			                                    <label class="col-sm-3 control-label">Email *</label>
			                                    <div class="col-sm-8">
			                                        <input id="email" name="email" type="text" class="form-control" require="必填项">
			                                    </div>
			                                </div>
			                                <div class="form-group">
			                                    <label class="col-sm-3 control-label">地址</label>
			                                    <div class="col-sm-8">
			                                        <input id="address" name="address" type="text" class="form-control">
			                                    </div>
			                                </div>
			                            </div>
			                        </div>
			                    </fieldset>
			                    <h1>警告</h1>
			                    <fieldset>
			                        <div class="text-center" style="margin-top: 120px">
			                            <h2>你是火星人 :-)</h2>
			                        </div>
			                    </fieldset>
			                    <h1>完成</h1>
			                    <fieldset>
			                        <h2>条款</h2>
			                        <input id="acceptTerms" name="acceptTerms" type="checkbox" require="必填项">
			                        <label for="acceptTerms">我同意注册条款</label>
			                    </fieldset>
			                </form>
			            </div>
			            <div class="box-footer">
			                查看 <a href="https://www.jquery-steps.cn/examples.html" target="_blank">jquery-steps插件</a> 获取更过样例和信息
			            </div>
			        </div>
			    </div>
			</div>
            <div class="row">
                <div class="col-sm-12">
                    <div class="box box-primary">
                        <div class="box-header">
                          <h3 class="box-title"> 默认向导</h3>
                        </div>
                        <div class="box-body">
                            <div id="example-default">
                                <h3>第一步</h3>
                                <section class="text-center">
                                    <img src="../../image/hongyuanwei.jpg" alt="">
                                </section>
                                <h3>第二步</h3>
                                <section class="text-center">
                                    <img src="../../image/bianzhulan.jpg" alt="">
                                </section >
                                <h3>第三步</h3>
                                <section class="text-center">
                                    <img src="../../image/yanzihua.jpg" alt="">
                                </section>
                                <h3>第四步</h3>
                                <section class="text-center">
                                    <img src="../../image/yuanweihua.jpg" alt="">
                                </section>
                            </div>
                        </div>
                        <div class="box-footer">
                            查看 <a href="https://www.jquery-steps.cn/examples.html" target="_blank">jquery-steps插件</a> 获取更过样例和信息
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>
    <script src="../../plugin/jquery/jquery.min.js"></script>
    <script src="../../plugin/bootstrap/js/bootstrap.min.js"></script>
    <script src="../../plugin/fastclick/fastclick.js"></script>
    <script src="../../adminlte/js/adminlte.min.js"></script>
    <script src="../../plugin/validate/validate.js"></script>
    <script src="../../plugin/steps/jquery.steps.min.js"></script>
    <script>
	    $(document).ready(function () {
            $("#form").steps({
                bodyTag: "fieldset",
				labels: {
					finish: "完成", // 修改按钮得文本
					next: "下一步", // 下一步按钮的文本
					previous: "上一步", // 上一步按钮的文本
					loading: "Loading ..."
				},
                onStepChanging: function (event, currentIndex, newIndex) {
	                if (currentIndex > newIndex) {
	                    return true
	                }
	                if (newIndex === 3) {
	                    return false
	                }
	                
	                if (currentIndex < newIndex) {
	                    
	                }
	                return doValidForm(form);
                },
                onStepChanged: function (event, currentIndex, priorIndex) {
	                if (currentIndex === 2) {
	                    $(this).steps("next")
	                }
	                if (currentIndex === 2 && priorIndex === 3) {
	                    $(this).steps("previous")
	                }
                },
                onFinishing: function (event, currentIndex) {
	                return doValidForm(form);
                },
                onFinished: function (event, currentIndex) {
	                var form = $(this);
	                form.submit()
	            }
	        })
			
			$("#example-default").steps({
			    headerTag: "h3",
			    bodyTag: "section",
			    transitionEffect: "fade",
			    autoFocus: true,
				labels: {
					finish: "完成", // 修改按钮得文本
					next: "下一步", // 下一步按钮的文本
					previous: "上一步", // 上一步按钮的文本
					loading: "Loading ..."
				},
			})
	    });
	</script>
</body>
</html>
